package net.fxug.hokuriku.chocolat.service
{
    import org.flexunit.assumeThat;
    import org.hamcrest.core.isA;


    public class TweetSearchSpanResolverTest
    {
        // Reference declaration for class to test
        private var classToTestRef:net.fxug.hokuriku.chocolat.service.TweetSearchSpanResolver;

        public function TweetSearchSpanResolverTest()
        {
        }

        [Test]
        public function testFindBaseTime():void
        {
            // 3分
            var base:int = 1000 * 60 * 3;
            classToTestRef = new TweetSearchSpanResolver(base);

            assumeThat(classToTestRef.findBaseTime(), isA(1000 * 60));
        }

        [Test]
        public function testFindBaseTime2():void
        {
            // 10分
            var base:int = 1000 * 60 * 10;
            classToTestRef = new TweetSearchSpanResolver(base);

            assumeThat(classToTestRef.findBaseTime(), isA(1000 * 60 * 3));
        }

        [Test]
        public function testFindBaseTime3():void
        {
            // 30分
            var base:int = 1000 * 60 * 30;
            classToTestRef = new TweetSearchSpanResolver(base);

            assumeThat(classToTestRef.findBaseTime(), isA(2.2 * 1000));
        }

        [Test]
        public function testFindBaseTime4():void
        {
            // 60分
            var base:int = 1000 * 60 * 60;
            classToTestRef = new TweetSearchSpanResolver(base);

            assumeThat(classToTestRef.findBaseTime(), isA(1000 * 60));
        }
    }
}